﻿namespace TfsCloudDeploy.Workflow.Tests.Mocks
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.TeamFoundation.Build.Client;
    using Microsoft.TeamFoundation.Build.Workflow;
    using TfsCloudDeploy.Workflow.Tests.Utility;

    internal class BuildDefinition : IBuildDefinition
    {
        public IRetentionPolicy AddRetentionPolicy(BuildReason reason, BuildStatus status, int numberToKeep, DeleteOptions deleteOptions)
        {
            return null;
        }

        public ISchedule AddSchedule()
        {
            return null;
        }

        public IBuildController BuildController
        {
            get
            {
                return new BuildController();
            }
            set
            {
            }
        }

        public Uri BuildControllerUri
        {
            get { return new Uri("vstfs:///Build/Controller/1"); }
        }

        public IBuildServer BuildServer
        {
            get { return new BuildServer(); }
        }

        public string ConfigurationFolderPath
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public int ContinuousIntegrationQuietPeriod
        {
            get
            {
                return 0;
            }
            set
            {
            }
        }

        public ContinuousIntegrationType ContinuousIntegrationType
        {
            get
            {
                return ContinuousIntegrationType.All;
            }
            set
            {
            }
        }

        public IBuildRequest CreateBuildRequest()
        {
            return null;
        }

        public IBuildDetail CreateManualBuild(string buildNumber, string dropLocation, BuildStatus buildStatus, IBuildController controller, string requestedFor)
        {
            return null;
        }

        public IBuildDetail CreateManualBuild(string buildNumber, string dropLocation)
        {
            return null;
        }

        public IBuildDetail CreateManualBuild(string buildNumber)
        {
            return null;
        }

        [Obsolete("This method has been deprecated. Please remove all references.", true)]
        public IProjectFile CreateProjectFile()
        {
            throw new NotImplementedException("Deprecated.");
        }

        public IBuildDefinitionSpec CreateSpec()
        {
            return null;
        }

        public IBuildAgent DefaultBuildAgent
        {
            get
            {
                return null;
            }
            set
            {
            }
        }

        public Uri DefaultBuildAgentUri
        {
            get { return new Uri("vstfs:///Build/Agent/1"); }
        }

        public string DefaultDropLocation
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public void Delete()
        {
        }

        public string Description
        {
            get
            {
                return string.Empty;
            }
            set
            {
            }
        }

        public bool Enabled
        {
            get
            {
                return true;
            }
            set
            {
            }
        }

        public string Id
        {
            get { return "1"; }
        }

        public Uri LastBuildUri
        {
            get { return new Uri("vstfs:///Build/Build/1"); }
        }

        public string LastGoodBuildLabel
        {
            get { return "Test_20100720.1"; }
        }

        public Uri LastGoodBuildUri
        {
            get { return new Uri("vstfs:///Build/Build/1"); }
        }

        public IProcessTemplate Process
        {
            get
            {
                return null;
            }
            set
            {
            }
        }

        public string ProcessParameters
        {
            get
            {
                return WorkflowHelpers.SerializeProcessParameters(WorkflowTestHelpers.GetProcessParameters());
            }
            set
            {
            }
        }

        public IBuildDetail[] QueryBuilds()
        {
            return null;
        }

        public Dictionary<BuildStatus, IRetentionPolicy> RetentionPolicies
        {
            get { return null; }
        }

        public List<IRetentionPolicy> RetentionPolicyList
        {
            get { return null; }
        }

        public void Save()
        {
        }

        public List<ISchedule> Schedules
        {
            get { return null; }
        }

        public IWorkspaceTemplate Workspace
        {
            get { return null; }
        }

        public string FullPath
        {
            get { return string.Empty; }
        }

        public string Name
        {
            get
            {
                return "Test";
            }
            set
            {
            }
        }

        public void Refresh()
        {
        }

        public string TeamProject
        {
            get { return "TestProject"; }
        }

        public Uri Uri
        {
            get { return new Uri("vstfs:///Build/Definition/1"); }
        }
    }
}
